﻿using System;
using System.Collections.Generic;
using System.Text;
using CYTools.Models.Model;
using System.Configuration;
using CYTools.Util;
using System.Data;
using System.Data.SqlClient;
using CYTools.Models.Dao;

namespace CYTools.Models.Service
{
    public class KehuInfoService
    {
        public SqlConnection conn = null;
        public SqlTransaction stran = null;
        public Database db = new Database();
        /// <summary>
        /// 获取客户信息
        /// </summary>
        /// <returns></returns>
        public List<KehuInfo> getKehuInfoList()
        {
            try
            {
                conn = db.GetConn();
                conn.Open();
                KehuInfoDao kehuDao = new KehuInfoDao();
                List<KehuInfo> uinfo = kehuDao.getKehuInfoList(conn);
                return uinfo;
            }
            catch (Exception ex)
            {
                throw ex;
            }
            finally
            {
                db.CloseConnection(conn);
            }
        }
    }
}
